Fedora 26
Sponsored Link

WebMail : RoundCube
2017/07/26
 
Install RoundCube to configure web-based mail transfer system like Yahoo Mail.
This example uses servers below for configuration of RoundCube.
+----------------------+          |          +----------------------+
| [   www.srv.world  ] |10.0.0.31 | 10.0.0.32| [  mail.srv.world  ] |
|    Apache httpd      +----------+----------+    Postfix (SMTP)    |
|  MariaDB   RoundCube |                     |    Dovecot (IMAP)    |
+----------------------+                     +----------------------+

[1]
[2]
[3]
[4]
[5]
[6] Create a Database for RoundCube.
[root@www ~]#
mysql -u root -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.1.25-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

# create [roundcube] database ( set your own password for [password] section )

MariaDB [(none)]>
create database roundcube;

Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on roundcube.* to roundcube@'localhost' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
exit

Bye
[7] Install RoundCube.
[root@www ~]#
dnf -y install roundcubemail
[root@www ~]#
cd /usr/share/roundcubemail/SQL

[root@www SQL]#
mysql -u roundcube -D roundcube -p < mysql.initial.sql

Enter password:  
# MariaDB roundcube パスワード

[root@www SQL]#
[root@www ~]#
cp -p /etc/roundcubemail/defaults.inc.php /etc/roundcubemail/config.inc.php

[root@www ~]#
vi /etc/roundcubemail/config.inc.php
# line 28: change like follows ( replace your password for 'password' )

$config['db_dsnw'] = 'mysql://roundcube:
password
@localhost/
roundcube
';
# line 138: specify IMAP server

$config['default_host'] = '
mail.srv.world
';
# line 254: specify SMTP server

$config['smtp_server'] = '
mail.srv.world
';
# line 262: change ( use the same user for SMTP auth and IMAP auth )

$config['smtp_user'] = '
%u
';
# line 266: change ( use the same password for SMTP auth and IMAP auth )

$config['smtp_pass'] = '
%p
';
# line 270: change ( SMTP auth type )

$config['smtp_auth_type'] = '
LOGIN
';
# line 282: specify SMTP HELO host

$config['smtp_helo_host'] = '
mail.srv.world
';
# line 514: specify your domain name

$config['mail_domain'] = '
srv.world
';
# line 544: change title

$config['product_name'] = '
Server World Webmail
';
# line 547: change UserAgent

$config['useragent'] = '
Server World Webmail
';
# line 676: change to your lang

$config['language'] =
ja_JP
;
# line 1032: change default char-set to your lang

$config['default_charset'] = '
iso-2022-jp
';
[root@www ~]#
vi /etc/httpd/conf.d/roundcubemail.conf
# line 14: IP address you permit to access

Require ip 10.0.0.0/24
[root@www ~]#
systemctl restart httpd

[8] If SELinux is enabled, change rules like follows.
[root@www ~]#
setsebool -P httpd_can_network_connect on

[9] Access to [https://(your server's hostname or IP address/)/roundcubemail/], then follwing screen is shown, authenticate with a user and his password to login.
[10] Just logined. Try to send or receive messages as tests.
 
Tweet